#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int* constructRectangle(int area, int* returnSize)
{
    int n = sqrt(area);
    int *num = malloc(sizeof(int)*2);
    *returnSize = 2;
    while(area % n != 0)
    {
        n--;
    }
    num[0] = area / n;
    num[1] = n;
    return num;

}


int main()
{
    int area = 36;
    int returnSize;
    int * p = constructRectangle(area,&returnSize);
    for(int i = 0;i < returnSize;i++)
    {
        printf("%d  ",p[i]);
    }
    printf("\n");
    free(p);
    p = NULL;
    return 0;
}